package com.bdqn.service.impl;

import com.bdqn.mapper.SysUserMapper;
import com.bdqn.mapper.storageRecordMapper;
import com.bdqn.pojo.StorageRecord;
import com.bdqn.pojo.SysUser;
import com.bdqn.service.storageRecordService;
import com.bdqn.util.Page;

import javax.annotation.Resource;
import java.util.List;

public class storageRecordServiceImpl implements storageRecordService {

    @Resource
    private storageRecordMapper storageRecordMapper;

    @Override
    public Long count() {
        return storageRecordMapper.count();
    }

    @Override
    public List<StorageRecord> page(Long queryRoleId, Page page) {

        Long pageSize = page.getPageSize();
        Long pageIndex = (page.getCurrentPageNo()-1)*pageSize;

        return storageRecordMapper.page(pageSize , pageIndex);
    }
}
